<div class="layui-side layui-bg-black">
	<div class="layui-side-scroll">
		<#include "/apps/service/include/left.html">
	</div>
</div>
<div class="layui-body">
	<div class="layui-side-scroll">
		<div class="row">
			<div class="col-lg-12">
				<h1 class="site-h1" style="border-top:1px solid #e6e6e6;">
					访客留言<#if leaveMsgList??>（${leaveMsgList.totalElements}）</#if>
				</h1>
				<table class="layui-table" lay-skin="line">
					<thead>
						<tr class="design-sortable-tr">
							<th>姓名</th>
							<th>电话</th>
							<th>邮件</th>
							<th>地址</th>
							<th>QQ</th>
							<th>内容</th>
							<th>留言时间</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody>
						<#if leaveMsgList?? && leaveMsgList.content??>
						<#list leaveMsgList.content as leaveMsg>
						<tr class="tdHasContorllor design-dropable-td">
							<td class=" first_td_head">
								<a href="javascript:void(0)">
								${leaveMsg.name!''}
								</a>
							</td>
							<td>
								${leaveMsg.mobile!''}
							<td>${leaveMsg.email!''}</td>
							<td>${leaveMsg.address!''}</td>
							<td>${leaveMsg.qq!''}</td>
							<td>${leaveMsg.content!''}</td>
							
							</td>
							<td><#if leaveMsg.createtime??>${leaveMsg.createtime?string('yyyy-MM-dd HH:mm:ss')}</#if></td>
							<td>
								<a href="/service/leavemsg/delete.html?id=${leaveMsg.id!''}" data-toggle="tip" title="删除留言不可恢复,请确认是否删除留言？">
									<i class="layui-icon">&#x1006;</i>删除
								</a>
							</td>
						</tr>
						</#list>
						<#else>
							<tr>
								<td colspan="20" style="height:400px;">
									<div class="ukefu-empty">
										<i class="layui-icon">&#xe63a;</i>
										<div style="">当前没有在线坐席</div>
									</div>
								</td>
							</tr>
						</#if>
					</tbody>
				</table>

			</div>
		</div>
		<div class="row" style="padding:5px;">
			<div class="col-lg-12" id="page" style="text-align:center;"></div>
		</div>
	</div>
</div>

<script>
	layui.use(['laypage', 'layer'], function(){
		  var laypage = layui.laypage
		  ,layer = layui.layer;
		  
		  laypage({
				cont: 'page'
				,pages: <#if leaveMsgList??>${leaveMsgList.totalPages}<#else>0</#if> //总页数
				,curr:<#if leaveMsgList??>${leaveMsgList.number+1}<#else>0</#if>
				,groups: 5 //连续显示分页数
				,jump:function(data , first){
					if(!first){
						location.href = "/service/leavemsg/index.html?p="+data.curr ;
					}
				}
		   });
		});
</script>
